
const apiBase = "https://api.it120.cc/fxy"

export const Request = (params) =>{

  return new Promise((resolve,reject) =>{
    wx.request({
      ...params,
      url:apiBase + params.url,
      header:{
        'content-type':'application/x-www-form-urlencoded'
      },
      success:(data) =>{resolve(data.data)},
      fail:(err)=>{reject(err)},
      complete:wx.hideLoading
    })
  })
}